ActivityCompat

Helper for accessing features in android.app.Activity.

Types

Link copied to clipboard
This interface is the contract for receiving the results for permission requests.
Link copied to clipboard
Customizable delegate that allows delegating permission compatibility methods to a custom implementation.

Functions

Link copied to clipboard
open fun finishAffinity(@NonNull activity: Activity)
Finish this activity, and tries to finish all activities immediately below it in the current task that have the same affinity.
Link copied to clipboard
open fun finishAfterTransition(@NonNull activity: Activity)
Reverses the Activity Scene entry Transition and triggers the calling Activity to reverse its exit Transition.
Link copied to clipboard
open fun getReferrer(@NonNull activity: Activity): Uri
Return information about who launched this activity.
Link copied to clipboard
Invalidate the activity's options menu, if able.
Link copied to clipboard
Indicates whether this activity is launched from a bubble.
Link copied to clipboard
Link copied to clipboard
open fun recreate(@NonNull activity: Activity)
Cause the given Activity to be recreated with a new instance.
Link copied to clipboard
Create DragAndDropPermissionsCompat object bound to this activity and controlling the access permissions for content URIs associated with the android.view.DragEvent.
Link copied to clipboard
open fun requestPermissions(@NonNull activity: Activity, @NonNull permissions: Array<String>, @IntRange(from = 0) requestCode: Int)
Requests permissions to be granted to this application.
Link copied to clipboard
open fun <T : View?> requireViewById(@NonNull activity: Activity, @IdRes id: Int): T
Finds a view that was identified by the android:id XML attribute that was processed in onCreate, or throws an IllegalArgumentException if the ID is invalid, or there is no matching view in the hierarchy.
Link copied to clipboard
When makeSceneTransitionAnimation was used to start an Activity, callback will be called to handle shared elements on the launched Activity.
Link copied to clipboard
When makeSceneTransitionAnimation was used to start an Activity, callback will be called to handle shared elements on the launching Activity.
Link copied to clipboard
open fun setLocusContext(@NonNull activity: Activity, @Nullable locusId: LocusIdCompat, @Nullable bundle: Bundle)
Sets the LocusIdCompat for this activity.
Link copied to clipboard
Sets the permission delegate for ActivityCompat.
Link copied to clipboard
Gets whether you should show UI with rationale before requesting a permission.
Link copied to clipboard
open fun startActivityForResult(@NonNull activity: Activity, @NonNull intent: Intent, requestCode: Int, @Nullable options: Bundle)
Start new activity with options, if able, for which you would like a result when it finished.
Link copied to clipboard
open fun startIntentSenderForResult(@NonNull activity: Activity, @NonNull intent: IntentSender, requestCode: Int, @Nullable fillInIntent: Intent, flagsMask: Int, flagsValues: Int, extraFlags: Int, @Nullable options: Bundle)
Start new IntentSender with options, if able, for which you would like a result when it finished.
Link copied to clipboard